An Executable Rewriting Logic Semantics of K-Scheme
نویسندگان
چکیده
This paper presents an executable rewriting logic semantics of KScheme, a dialect of Scheme based (partially) on the informal definition given in the RRS report (Kelsey et al. 1998). The presented semantics follows the K language definitional style (Roşu 2005 and 2006) and is a pure rewriting logic specification (Meseguer 1992) containing 772 equations and 1 rewrite rule, so it can also be regarded as an algebraic denotational specification with an initial model semantics. Rewriting logic specifications can be executed on common (context-insensitive) rewrite engines, provided that equations are oriented into rewrite rules, typically from left-to-right. While in theory rewriting logic specifications can let certain behaviors underspecified, thus allowing more models, in practice they need to completely specify all the desired behaviors if one wants to use their associated rewrite systems as “interpreters”, or “implementations”. To become executable, K-Scheme overspecifies certain features left undefined on purpose in RRS. In spite of overspecifying for executability reasons, the rewriting logic semantics in this paper is the most complete formal definition of a language in the Scheme family that we are aware of, in the sense that it provides definitions for more Scheme language features than any other similar attempts. The presented executable definition of K-Scheme can serve as a platform for experimentation with variants and extensions of Scheme, for example concurrency. The Maude system is used in this paper, but other rewrite engines could have been used as well. Even though, on paper, K rewrite-based definitions tend to be as compact and high-level as reduction-based definitions with evaluation contexts, their complete translation in Maude as executable specifications is rather verbose and low-level. An automated translator from K to Maude is under development, which will reduce the size of definitions following the K style several times and will certainly increase their readability. The complete Maude specification is public, together with a web-based interface to “execute” K-Scheme programs without having to download Maude.
منابع مشابه
A K Definition of Scheme ⋆
This paper presents an executable rewriting logic semantics of RRS Scheme using the K definitional technique [19]. We refer to this definition as K-Scheme. The presented semantics follows the K language definitional style but is almost entirely equational. It can also be regarded as a denotational specification with an initial model semantics of Scheme. Equational specifications can be executed...
متن کاملFrom Rewriting Logic, to Programming Language Semantics, to Program Verification
Rewriting logic has proven to be an excellent formalism to define executable semantics of programming languages, concurrent or not, and then to derive formal analysis tools for the defined languages with very little effort, such as model checkers. In this paper we give an overview of recent results obtained in the context of the rewriting logic semantics framework K, such as complete semantics ...
متن کاملThe rewriting logic semantics project
Rewriting logic is a flexible and expressive logical framework that unifies algebraic denotational semantics and structural operational semantics (SOS) in a novel way, avoiding their respective limitations and allowing succinct semantic definitions. The fact that a rewrite logic theory’s axioms include both equations and rewrite rules provides a useful “abstraction dial” to find the right balan...
متن کاملThe Rewriting Logic Semantics Project: A Progress Report
Rewriting logic is an executable logical framework well suited for the semantic definition of languages. Any such framework has to be judged by its effectiveness to bridge the existing gap between language definitions on the one hand, and language implementations and language analysis tools on the other. We give a progress report on how researchers in the rewriting logic semantics project are n...
متن کاملRewriting semantics of production rule sets
This paper is about the semantics of production rule sets, a language used to model asynchronous digital circuits. Two formal semantics are developed and proved equivalent: a set-theoretic semantics that improves upon an earlier effort of ours, and an executable semantics in rewriting logic. The set-theoretic semantics is especially suited to meta-level proofs about production rule sets, wherea...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2007